﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Text;
using DTcms.Common;

namespace DTcms.Web
{
    public partial class PaperDetail : System.Web.UI.Page
    {
        protected DataTable dtMenu = null;
        protected string title = "";
        protected string connnt = "";
        protected DateTime datetime;
        protected string category_id = "";
        protected int _id = DTRequest.GetQueryInt("id");
        protected void Page_Load(object sender, EventArgs e)
        {


            //id = _id.ToString();

            if (_id != 0)
            {
                Model.article modelA = new BLL.article().GetModel(_id);
                Model.article_category model = new BLL.article_category().GetModel(modelA.category_id);
                category_id = modelA.category_id.ToString();
                Model.article_category modelP = new BLL.article_category().GetModel(model.parent_id);
              
                StringBuilder html = new StringBuilder();
                html.Append("<a href=\"/index.aspx\">主页</a>");
                if (modelP != null)
                {
                    html.Append("> <a href=\"" + modelP.link_url + "\">" + modelP.title + "</a>");
                }
                if (modelP != null)
                {
                    html.Append("> <a href=\"" + model.link_url + "\">" + model.title + "</a>");
                }
                memu.InnerHtml = html.ToString();
                rptTeam.DataSource = new BLL.article_category().GetList(model.parent_id, model.channel_id);
                rptTeam.DataBind();
            }
            datetime = new BLL.article().GetModel(_id).add_time;
           title = new BLL.article().GetModel(_id).title;
            connnt = new BLL.article().GetModel(_id).content;
           

        }


    }
}